<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:fragment="head(title)">
    <meta charset="UTF-8">
    <title th:replace="${title}">博客详情</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <!--<link rel="stylesheet" href="css/semantic.min.css">-->
    <link rel="stylesheet" href="../static/css/typo.css" th:href="@{/css/typo.css}">
    <link rel="stylesheet" href="../static/css/custom.css" th:href="@{/css/custom.css}">
    <link rel="stylesheet" href="../static/css/Animate.css" th:href="@{/css/Animate.css}">
    <link rel="stylesheet" href="../static/lib/prism/prism.css" th:href="@{/lib/prism/prism.css}">
    <link rel="stylesheet" href="../static/lib/tocbot/tocbot.css" th:href="@{/lib/tocbot/tocbot.css}">
</head>
<body>

<!--当行栏:inverted反转（黑色）；attached(依附，消除圆角)；segment（片段）-->
<nav th:fragment="menu(n)" class="ui inverted attached segment">
    <!--container（容器，合适的大小）-->
    <div class="ui container ">
        <!--菜单-->
        <div class="ui inverted secondary stackable menu m-padded-tb-mini">
            <!--在menu中item为具体的项，header为标题-->
            <h2 class="ui teal header item">Blog</h2>
            <a href="#" th:href="@{/}" class="m-item item m-mobile-hide" th:classappend="${n==1}? 'active'"><i class="home icon"></i>首页</a>
            <a href="#" th:href="@{/types(id=-1)}" class="m-item item m-mobile-hide" th:classappend="${n==2}? 'active'"><i class="idea icon"></i>分类</a>
            <a href="#" th:href="@{/tags(id=-1)}" class="m-item item m-mobile-hide" th:classappend="${n==3}? 'active'"><i class="tags icon"></i>标签</a>
            <a href="#" th:href="@{/archives}" class="m-item item m-mobile-hide" th:classappend="${n==4}? 'active'"><i class="mini clone icon"></i>归档</a>
            <a href="#" th:href="@{/about}" class="m-item item m-mobile-hide" th:classappend="${n==5}? 'active'"><i class="info icon"></i>关于我</a>
            <!--在menu中right控制item在右边-->
            <div class="right item">
                <form name="search" action="#" th:action="@{/search}" method="post" target="_blank">
                    <!--输入框 icon：控制div内部可以含有图标-->
                    <div class="ui icon input">
                        <input type="text" name="query" th:value="${query}" placeholder="search....">
                        <!-- link：鼠标到达该区域，显示为小手 -->
                        <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                    </div>
                </form>
            </div>
        </div>

        <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
            <i class="sidebar icon"></i>
        </a>
    </div>

</nav>

<!--底部footer-->
<footer th:fragment="footer" class="ui inverted vertical segment m-padded-tb-massive">
    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">
            <div class="three wide column">
                <div class="ui inverted link list">
                    <div class="item">
                        <img src="../static/images/weichart.jpg" th:src="@{/images/weichart.jpg}"
                             class="ui rounded image" alt="" style="width: 110px">
                    </div>
                </div>

            </div>

            <div class="four wide column">
                <h4 class="ui inverted header">最新博客</h4>

                <div id="newBlogList-container">
                    <div class="ui inverted link list" th:fragment="newBlogList">
                        <a href="#" th:href="@{/blog(id=${blog.id})}" class="item" target="_blank" th:each="blog : ${blogList}" th:text="${blog.title}">用户故事(user story)</a>
                    </div>
                </div>
            </div>
            <div class="four wide column">
                <h4 class="ui inverted header">联系我</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item" th:text="|Email:#{index.email}|">Email:905379100@qq.com</a>
                    <a href="#" class="item">QQ:905379100</a>
                </div>
            </div>
            <div class="five wide column">
                <h4 class="ui inverted header">Blog</h4>
                <div class="ui inverted link list">
                    <p class="item">这是我的个人博客、会分享关于编程、写作、思考相关的任何内容，希望可以给来到这儿的人有所帮助...</p>
                </div>

            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <p class="m-text-thin m-text-spaced m-opacity-tiny">Copyright © 2019 - 2020 liuyang Designed by liuyang</p>
    </div>
</footer>

<th:block th:fragment="script">
    <script src="../static/js/jquery-3.4.1.min.js" th:src="@{/js/jquery-3.4.1.min.js}"></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
    <script src="../static/lib/prism/prism.js" th:src="@{/lib/prism/prism.js}"></script>
    <script src="../static/lib/tocbot/tocbot.min.js" th:src="@{/lib/tocbot/tocbot.min.js}"></script>
    <script src="../static/lib/qrcode/qrcode.min.js" th:src="@{/lib/qrcode/qrcode.min.js}"></script>
    <script>
        $('#newBlogList-container').load("/footer/newBlogList")
    </script>
</th:block>

</body>
</html>